<!--
 * @Author: master
 * @Date: 2022-03-29 17:20:59
 * @LastEditTime: 2022-04-06 15:07:35
 * @Description: main
-->
<template>
  <main class="index">
    <div class="universe" />
    <h1 class="m-title" @click="toLayout">{{ $t('title') }}</h1>
  </main>
</template>
<script setup>
import { onBeforeMount, onMounted } from 'vue';
import { useRouter } from 'vue-router';
import { getName } from '@path/services/global.js';
const router = useRouter();
/**
 * 获取demo名称
 */
const getDemoName = () => {
  getName();
};
/**
 * 去业务layout demo
 */
const toLayout = () => {
  router.push({ name: 'layout' });
};
onBeforeMount(() => {});
onMounted(() => {
  // 获取demo名称
  getDemoName();
});
</script>
<style lang="less" scoped>
@import './main.less';
</style>
